//---------------------------
// Includes
//---------------------------
#include "StdAfx.h"
#include "Transformer.h"

//---------------------------
// Defines
//---------------------------

//---------------------------
// Constructor & Destructor
//---------------------------
Transformer::Transformer()
{
}

Transformer::~Transformer()
{
}

//---------------------------
// Eigen methoden
//---------------------------
void Transformer::Reset(D3DXMATRIX &matWorld)
{
	D3DXMatrixIdentity(&matWorld);
}
void Transformer::Translate(const D3DXVECTOR3 pos, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Translation;
	D3DXMatrixTranslation(&Translation,pos.x,pos.y,pos.z);
	matWorld*=Translation;
}
void Transformer::Translate(float x,float y,float z, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Translation;
	D3DXMatrixTranslation(&Translation,x,y,z);
	matWorld*=Translation;
}
void Transformer::Rotate(const D3DXVECTOR3 angles, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Rotation;
	D3DXMatrixRotationYawPitchRoll(&Rotation,angles.y,angles.x,angles.z);
	matWorld*=Rotation;
}
void Transformer::Rotate(float x,float y,float z, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Rotation;
	D3DXMatrixRotationYawPitchRoll(&Rotation,y,x,z);
	matWorld*=Rotation;
}
void Transformer::Scale(const D3DXVECTOR3 scales, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Scale;
	D3DXMatrixScaling(&Scale,scales.x,scales.y,scales.z);
	matWorld*=Scale;
}
void Transformer::Scale(float x, float y , float z, D3DXMATRIX &matWorld)
{
	D3DXMATRIX Scale;
	D3DXMatrixScaling(&Scale,x,y,z);
	matWorld*=Scale;
}



